import WxJsSDKJsApiList from "./WxJsSDKJsApiList";
import {IWxJsSDKCommonParam} from "./IWxJsSDKCommonParam";

import CategoryShare from "./Category/CategoryShare";
import CategoryImage from "./Category/CategoryImage";
import CategoryAudio from "./Category/CategoryAudio";
import CategoryIntelligence from "./Category/CategoryIntelligence";
import CategoryEquipInfo from "./Category/CategoryEquipInfo";
import CategoryGeo from "./Category/CategoryGeo";
import CategoryShakeAround from "./Category/CategoryShakeAround";
import CategoryUIControl from "./Category/CategoryUIControl";
import CategoryScan from "./Category/CategoryScan";
import CategoryShop from "./Category/CategoryShop";
import CategoryCardCoupon from "./Category/CategoryCardCoupon";
import CategoryWechatPay from "./Category/CategoryWechatPay";
import CategoryQuickInput from "./Category/CategoryQuickInput";

export default interface IWxJsSDKNative extends CategoryShare,
    CategoryImage,
    CategoryAudio,
    CategoryIntelligence,
    CategoryEquipInfo,
    CategoryGeo,
    CategoryShakeAround,
    CategoryUIControl,
    CategoryScan,
    CategoryShop,
    CategoryCardCoupon,
    CategoryWechatPay,
    CategoryQuickInput {

    config(conf: IWxJsSDKConfig): void;

    ready(cb: () => void): void;

    error(cb: (error: any) => void): void;

    checkJsApi(param: IWxJsSDKCheckJsApiParam): void;

}

export interface IWxJsSDKCheckJsApiParam extends IWxJsSDKCommonParam {
    jsApiList: WxJsSDKJsApiList[];

    success(res: { checkResult: { [prop: string]: boolean }; errMsg: string; }): void;
}


export interface IWxJsSDKConfig {
    debug?: boolean; // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
    appId: string; // 必填，公众号的唯一标识
    timestamp: number; // 必填，生成签名的时间戳
    nonceStr: string; // 必填，生成签名的随机串
    signature: string;// 必填，签名
    jsApiList: WxJsSDKJsApiList[]; // 必填，需要使用的JS接口列表
}
